package kr.hkit.androidcomplete01.chaptert07;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;

public class NewPaintEx1 extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		MyView mv = new MyView(this);
		setContentView(mv);
	}
	
	class MyView extends View {

		public MyView(Context context) {
			super(context);
		}

		@Override
		protected void onDraw(Canvas canvas) {
			super.onDraw(canvas);
			canvas.drawColor(Color.LTGRAY);
			Paint Pnt = new Paint();
			
			Pnt.setAntiAlias(true);
			Pnt.setColor(Color.BLUE);
			Pnt.setStrokeWidth(10);
			Pnt.setStyle(Paint.Style.STROKE);
			Pnt.setStrokeJoin(Paint.Join.BEVEL);
			canvas.drawRect(10, 10, 300, 100, Pnt);
		}
		
		
		
	}
}
